
<%@ page import="ecitys.commons.Uf" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'uf.label', default: 'Uf')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
		<gui:resources components="['dataTable','datePicker']"/>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
        
		<div class="body">
            <h1><g:message code="default.list.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
			<div class="yui-skin-sam">
			<gui:dataTable
						caption="Relação de UFs Cadastradas"
						draggableColumns="true"
						id="dt_2"
						columnDefs="[
							[key:'id', sortable:true, resizeable: true, label:'ID'],
							[key:'codigoUF', sortable:true, resizeable: true, label:'Cód. UF'],
							[key:'nomeUF', sortable:true, resizeable: true, label: 'Nome da UF']
						]"
						paginatorConfig="[
							template:'{PreviousPageLink} {PageLinks} {NextPageLink} {CurrentPageReport}',
							pageReportTemplate:'{totalRecords} total records'
						]"
						controller="uf" action="listAsJSON"
						
						resultsList="results"
						rowClickNavigation="true"
						collapseOnExpansionClick="true"
						rowsPerPage="3"
            />
            </div>
        </div>
    </body>
</html>
